import service_upload from '@/utils/request_upload';

/**
 * 文件上传
 */
export async function fileUpload(data) {
  const res = await service_upload.post('/file/upload', data);
  if (res.data.code === 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}
